package com.anjubao.parking.municipal.order.mapper;

import com.anjubao.parking.municipal.order.model.ParkingTradeOrder;
import com.anjubao.parking.municipal.payment.dto.OrderPayChannelFeeDto;
import com.anjubao.parking.municipal.payment.dto.OrderZoneFeeDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单Mapper
 *
 * @author zhuchunfeng
 */
@Mapper
public interface ParkingTradeOrderMapper extends BaseMapper<ParkingTradeOrder> {

    /**
     * 查询订单支付方式占比
     * @param cityId 城市ID
     * @param startTime 开始时间
     * @param endTime 结束时间
     * @return 统计占比
     */
    List<OrderPayChannelFeeDto> queryParkingStatOrdersFee(Integer cityId, LocalDateTime startTime, LocalDateTime endTime);

    /**
     * 按地区统计收费金额/欠费金额
     * @param cityId 城市ID
     * @param startTime 开始时间
     * @param endTime 结束时间
     * @param status 收费/欠费
     * @return 每个地区的收费/欠费金额
     */
    List<OrderZoneFeeDto> queryZonesPaidFee(Integer cityId, LocalDateTime startTime, LocalDateTime endTime, Integer status);


    String queryTotalFee(LocalDate Time);
}
